import com.demo.controller.StudentController;
import com.demo.controller.StudentController2;
import com.demo.controller.StudentController3;
import com.demo.controller.StudentController5;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class App {
    public static void main(String[] args) {
        // 1. 获取Spring对象
        ApplicationContext context = new ClassPathXmlApplicationContext("spring-config.xml");

        // 2. 获取Bean对象
        StudentController studentController = context.getBean("studentController", StudentController.class);

        // 3. 使用Bean
        studentController.sayHi();
    }
}
